class Transaction < ActiveRecord::Base
  attr_accessible :amount, :giver_id, :giver_type, :on_date, :receiver_id, :receiver_type, :reference_id, :reference_type,:giver,:receiver,:reference
  belongs_to :giver, :polymorphic => true
  belongs_to :receiver, :polymorphic => true
  belongs_to :reference, :polymorphic => true
  validates :amount, :numericality => true,:presence => true
  validates :on_date, :presence => true
end
